define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		//返回信息
		return {
			//发票新增
			invoice_edit: function(tax_ratio1,tax_ratio2,callback) {
				var updateParams = new Object();
				updateParams.tax_ratio1 = tax_ratio1;
				updateParams.tax_ratio2 = tax_ratio2;
				updateParams = JSON.stringify(updateParams);
				//post请求
				Http.post({
					method: 'member.invoice.vatedit',
					updateParams: updateParams
				}, function(result) {
					//函数回调
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				});
			},
			invoice_detail:function(id,callback){
				Http.post({
					method:'member.invoice.vatdetail',
				},function(result){
					if(callback)
					callback(result.result);
				},function(e){
					
				},function(){
					
				})
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("T_address_add_fp_buyer", factory);
});